]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Cleanup: use destructuring assignment
authorOwen Taylor <otaylor@src.gnome.org>
Fri, 16 Jan 2009 20:40:16 +0000 (20:40 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Fri, 16 Jan 2009 20:40:16 +0000 (20:40 +0000)
For multiple return values use

 let [val1, val2, val3] = function();

Rather than:

 temp = function();
 val1 = temp[0];
 ...

svn path=/trunk/; revision=149

js/ui/docDisplay.js

index badce3010218be38d6c11333af9b5f6a08625362..c9af0cf54f20cafad5cbd9bad802504aae5e4a4f 100644 (file)
@@ -65,11 +65,7 @@ DocDisplayItem.prototype = {
     // Opens a document represented by this display item.
     launch : function() {
         let appName = this._docInfo.last_application();
-        let appData = this._docInfo.get_application_info(appName);
-        let success = appData[0]; 
-        let appExec = appData[1];
-        let count = appData[2];
-        let time = appData[3];
+        let [success, appExec, count, time] = this._docInfo.get_application_info(appName);
         if (success) {
             log("Will open a document with the following command: " + appExec);
             // TODO: Change this once better support for creating GAppInfo is added to